home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / bin / prowl (.txt) < prev    next >
Microsoft Windows Help File Content  |  1995-07-29  |  2KB  |  67 lines

  1. # Prowl - Skunkware 5.0 shell script front-end to Mosaic to set the
  2. #         home page. This is necessary because on SCO OpenServer 5
  3. #         a /usr/lib/X11/app-defualts/Mosaic will already be installed
  4. #         and a default home page already configured.
  5. # if no argument specified, query the user on the type of display
  6. QUERY=1
  7. LCFG=/usr/skunk/lib/lynx/lynx.cfg
  8. HOMEPAGE=/usr/skunk/lib/X11/Mosaic/index.html
  9. useage() {
  10.     echo "Useage: prowl [-c | -x | -s]"
  11.     echo "\tWhere -c indicates use character mode browser,"
  12.     echo "\t      -x indicates use X11 graphical browser,"
  13.     echo "\t      -s indicates choose browser based on DISPLAY."
  14.     exit 1
  15. getyn() {
  16.     ans=
  17.     while [ "$ans" = "" ]
  18.         read ans
  19.         [ "$ans" = "Y" ] || [ "$ans" = "y" ] && {
  20.             ans=Y
  21.             break
  22.         [ "$ans" = "n" ] || [ "$ans" = "N" ] && {
  23.             ans=N
  24.             break
  25.         ans=
  26.         echo "\nPlease answer with a Y or N \c"
  27.     done
  28. echo $PATH | grep /usr/skunk/bin/X11 > /dev/null || {
  29.     PATH=$PATH:/usr/skunk/bin:/usr/skunk/bin/X11
  30.     export PATH
  31. while case "$1" in
  32.     "")    break 
  33.     -c)    [ "$X" = 1 ] && useage
  34.         X=2
  35.     -x)    [ "$X" = 2 ] && useage
  36.         X=1
  37.     -s) QUERY=
  38.         [ "$X" ] || X=0
  39.     *)  useage
  40.     esac
  41.     shift
  42. [ "$X" = "" ] && [ "$QUERY" ] && {
  43.     echo "Are you using an X11 display (type Y if you don't know) ? <Y/N>\c"
  44.     getyn
  45.     [ "$ans" = "Y" ] && X=1
  46. if [ "$DISPLAY" ]
  47.     [ $X = 0 ] && [ "$QUERY" ] && {
  48.         echo "DISPLAY environment variable is set."
  49.         echo "In order to browse with Lynx, unset DISPLAY in your environment."
  50.         echo "Using Mosaic X11 browser."
  51.         echo "Ok ? <Y/N>\c"
  52.         getyn
  53.         [ "$ans" = "N" ] && {
  54.             echo "Exiting"
  55.             exit 1
  56.     /usr/skunk/bin/X11/Mosaic -home $HOMEPAGE
  57.     [ $X = 1 ] && [ "$QUERY" ] && {
  58.         echo "DISPLAY environment variable is not set."
  59.         echo "In order to browse with Mosaic, set DISPLAY in your environment."
  60.         echo "Using Lynx character browser."
  61.         echo "Ok ? <Y/N>\c"
  62.         getyn
  63.         [ "$ans" = "N" ] && {
  64.             echo "Exiting"
  65.             exit 1
  66.     /usr/skunk/bin/lynx -cfg=$LCFG file:$HOMEPAGE
  67.